import request from './axios'
// 通过ip地址获得城市名称
export const getIpCity = () => {
  return request.get('/ip?key=aa6369123ff2a08b72097df1c12d37df')
}
// 通过adcode 获得城市天气
export const getWeatherByAdcode = (adcode) => {
  return request.get(`/weather/weatherInfo?city=${adcode}&key=aa6369123ff2a08b72097df1c12d37df&extensions=all`)
}
// 通过城市名称获得adcode
export const getAdcodeByCity = (city) => {
  return request.get(`/geocode/geo?address=${city}&key=aa6369123ff2a08b72097df1c12d37df`)
}
